[broadway] Fix canvas resize when resizing browser window
authorAlexander Larsson <alexl@redhat.com>
Tue, 12 Apr 2011 09:34:13 +0000 (11:34 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 12 Apr 2011 09:34:13 +0000 (11:34 +0200)
We always have to resize the canvas, even when its in a toplevel.

gdk/broadway/broadway.js

index a78a44e860481c6fae674843ac20e9010a7ca2c1..82c7ac42f9d74d9d89062fff55d2ef7649f046d9 100644 (file)
@@ -654,6 +654,9 @@ function cmdMoveResizeSurface(id, has_pos, x, y, has_size, w, h)
     /* Flush any outstanding draw ops before (possibly) changing size */
     flushSurface(surface);
 
+    if (has_size)
+       resizeCanvas(surface.canvas, w, h);
+
     if (surface.visible) {
        if (surface.window) {
            /* TODO: This moves the outer frame position, we really want the inner position.
@@ -665,9 +668,6 @@ function cmdMoveResizeSurface(id, has_pos, x, y, has_size, w, h)
            if (has_size)
                resizeBrowserWindow(surface.window, w, h);
        } else {
-           if (has_size)
-               resizeCanvas(surface.canvas, w, h);
-
            if (has_pos) {
                var xOffset = surface.x;
                var yOffset = surface.y;